package itsm.isperp.module.controller.knowledge;

import itsm.isperp.framework.web.controller.BaseController;
import itsm.isperp.framework.web.response.ResultMessage;
import itsm.isperp.module.entity.knowledge.KngKnowledgeComment;
import itsm.isperp.module.service.knowledge.KngKnowledgeCommentService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("knowledge/knowledgeComment")
public class KngKnowledgeCommentController extends
		BaseController<KngKnowledgeComment> {

	/**
	 * 
	 */
	@Autowired
	protected KngKnowledgeCommentService kngKnowledgeCommentService;

	@Override
	public KngKnowledgeCommentService getService() {
		return kngKnowledgeCommentService;
	}

	@Override
	public String getPageTitle() {
		return "知识";
	}

	@RequestMapping("addComment")
	@ResponseBody
	public ResultMessage addCommont(String knowledgeId, String contents) {
		return this.getService().addCommont(knowledgeId, contents);
	}

}
